﻿<html>
<head>
    <title></title>
    <script src="~/js/jquery-1.9.1.js"></script>        
    <!--FancyBox-->
    <link rel="stylesheet" href="css/jquery.fancybox.css?v=2.1.5" type="text/css" media="screen" />
    <script type="text/javascript" src="js/jquery.fancybox.pack.js?v=2.1.5"></script>
    <script type="text/javascript">
        $(document).ready(function () {

            /*$(".externo").fancybox({
                width: 600,
                height: 400,
                fitToView: false,
                autoSize: false,
                type: 'iframe',
            });*/
        })
    </script>
</head>
<body width="100%">
    @{
        
        List<ENTIDADES.Mesa> lstMesa = (List<ENTIDADES.Mesa>)ViewBag.listadoMesa;
        if (lstMesa != null)
        {
            <table align="center" >
                @{
                    int numfilas = 0;
                    <tr>
                    @foreach (var x in (List<ENTIDADES.Mesa>)ViewBag.listadoMesa)
                    {
                       if(numfilas==0){
                        <tr></tr>
                        }
                       numfilas++;
                       if (@x.estado)
                         {            
                            <td align="center" width="27%"><img src="~/img/table_ocupada.png" /><br />
                                <p style="color:Gray; font-family:Arial; font-size: 12px;"><label style="width:100%;">@x.descripcion</label> </p> 
                                <br />                   
                            </td>    
                         }
                         else
                         {
                            <td align="center" width="27%"><img src="~/img/table_libre.png" /><br />
                                <p style="color:orangered;font-family:Arial; font-size: 12px;"><label style="width:100%;">@x.descripcion</label> </p>
                                @Html.ActionLink("Ir", "formPedido", new { idMesa = x.idmesa })
                                <br />
                            </td>  
                         }
                         if (numfilas == 4)
                         {
                            <tr></tr>
                         }
                    }
                    </tr>
                }
            </table>
        }
    }
</body>
</html>